import { get, post, patch, remove } from './index'
import { LoginResponse,CaptchaResponse } from '../types/login'
//登录
export function login(data: LoginResponse) {
  return post<any>('/login/index/login', { data });
}
//短token过期
export function shortToken(data: CaptchaResponse) {
  return get<any>('/login/index/refresh_token', { data });
}
//验证码获取
export function captcha(data: CaptchaResponse) {
  return post<any>('/login/index/go_Verification', { data });
}
//获取权限数据
export function getPermission(data: any) {
  return get<any>('/login/index/getPermissions', { data });
}
//////团长//////------------------------------
//获取团长数据
export function getGroup(data: any) {
  return get<any>('/groupjs/index/getgroups', { data });
}
//修改团长数据 已通过接口
export function updateGroup_ok(data: any) {
  return post<any>('/groupjs/index/updategroup_ok', { data });
} 
//修改团长数据 报废接口
export function updateGroup_no(data: any) {
  return post<any>('/groupjs/index/updategroup_no', { data });
} 
//撤回已通过
export function updateGroup_out(data: any) {
  return post<any>('/groupjs/index/updategroup_out', { data });
}
//批量通过
export function updateGroup_all_ok(data: any) {
  return post<any>('/groupjs/index/updategroup_all_ok', { data });
}
//批量报废
export function updateGroup_all_no(data: any) {
  return post<any>('/groupjs/index/updategroup_all_no', { data });
}
//组合搜索
export function GroupSearch(data: any) {
  return post<any>('/groupjs/index/group_search', { data });
}
//团长管理++++++++++++++++++++++
//修改团长状态为无效
export function updateGroup_statue(data: any) {
  return post<any>('/groupjs/index/updateGroup_statue', { data });
}
//修改团长状态为有效
export function updateGroup_statue_ok(data: any) {
  return post<any>('/groupjs/index/updateGroup_statue_ok', { data });
}
//团长管理批量搜索
export function group_search_Administration(data: any) {
  return post<any>('/groupjs/index/look_list_Administration', { data });
}
//添加团长标签
export function addGroupTag(data: any) {
  return post<any>('/groupjs/index/addGroupTag', { data });
}
//批量添加有效
export function updateLable_all_ok(data: any) {
  return post<any>('/groupjs/index/updateLable_all_ok', { data });
}
//批量添加无效
export function updateLable_all_no(data: any) {
  return post<any>('/groupjs/index/updateLable_all_no', { data });
}
//标签+++++++++++++++++++++++++++++++
//标签搜索
export function tag_search(data: any) {
  return post<any>('/groupjs/index/tag_search', { data });
}
//添加标签
export function addTag(data: any) {
  return post<any>('/groupjs/index/addTag', { data });
}
//修改标签
export function upTag(data: any) {
  return post<any>('/groupjs/index/upTag', { data });
}


////===================商品=====================
//商品获取
export function getGoods(data: any) {
  return post<any>('/commodity/index/getGoods', { data });
}
//删除商品
export function deleteGoods(data: any) {
  return post<any>('/commodity/index/deleteGoods', { data });
}
//商品修改
export function updateGoods(data: any) {
  return post<any>('/commodity/index/updateGoods', { data });
}
//修改状态
export function updateGoodsStatue(data: any) {
  return post<any>('/commodity/index/updateGoodsStatue', { data });
}
//获取类别
export function getGoodsType(data: any) {
  return post<any>('/commodity/index/getGoodsType', { data });
}
//搜索商品
export function searchGoods(data: any) {
  return post<any>('/commodity/index/searchGoods', { data });
}

//获取商品类别
export function getGoodsTypeList(data: any) {
  return post<any>('/commodity/index/getGoodsTypeList', { data });
}
//获取商品标签
export function getGoodsTagList(data: any) {
  return post<any>('/commodity/index/getGoodsTagList', { data });
}
//获取商品品牌
export function getGoodsBrandList(data: any) {
  return post<any>('/commodity/index/getGoodsBrandList', { data });
}
//添加商品
export function addGoods(data: any) {
  return post<any>('/commodity/index/addGoods', { data });
}
//类型修改
export function addGoodsType(data: any) {
  return post<any>('/commodity/index/addGoodsType', { data });
}
//类型删除
export function delGoodsType(data: any) {
  return post<any>('/commodity/index/del_type', { data });
}
//商品类型添加
export function addGoodsList(data: any) {
  return post<any>('/commodity/index/addGoodsList', { data });
}
//搜索商品列表
export function searchGoodsList(data: any) {
  return post<any>('/commodity/index/searchGoodsList', { data });
}

//商品品牌-----------
//修改
export function editGoodsBrand(data: any) {
  return post<any>('/commodity/index/editGoodsBrand', { data });
}
//删除
export function delGoodsBrand(data: any) {
  return post<any>('/commodity/index/delGoodsBrand', { data });
}
//新建品牌
export function addGoodsBrand(data: any) {
  return post<any>('/commodity/index/addGoodsBrand', { data });
}
//搜索品牌
export function searchGoodsBrand(data: any) {
  return post<any>('/commodity/index/searchGoodsBrand', { data });
}

//标签-------------------------
//修改
export function editGoodsTag(data: any) {
  return post<any>('/commodity/index/editGoodsTag', { data });
}
//删除
export function delGoodsTag(data: any) {
  return post<any>('/commodity/index/delGoodsTag', { data });
}
//新建标签
export function addGoodsTag(data: any) {
  return post<any>('/commodity/index/addGoodsTag', { data });
}
//搜索标签
export function searchGoodsLabel(data: any) {
  return post<any>('/commodity/index/searchGoodsTag', { data });
}








// -----------------系统管理----------------------
// =========账户管理接口=================
// 获取用户信息接口
export function getuser(data: LoginResponse) {
  return get<any>('/systems/index/getuser', { data });
}
// 添加账号接口
export function adduser(data: LoginResponse) {
  return post<any>('/systems/index/adduser', { data });
}

// 删除账号接口
export function deluser(data: LoginResponse) {
  return get<any>('/systems/index/deluser', { data });
}

// 数据回显
export function edituser(data: LoginResponse) {
  return get<any>('/systems/index/edituser', { data });
}

export function updateuser(data: LoginResponse) {
  return post<any>('/systems/index/updateuser', { data });
}

// =========角色管理接口=================
// 获取角色列表
export function getcos(data: LoginResponse) {
  return get<any>('/systems/index/getcos', { data });
}
// 添加角色
export function addcos(data: LoginResponse) {
  return post<any>('/systems/index/addcos', { data });
}
// 删除角色
export function delcos(data: LoginResponse) {
  return get<any>('/systems/index/delcos', { data });
}

// 数据回显
export function coseditcos(data: LoginResponse) {
  return get<any>('/systems/index/coseditcos', { data });
}
// 修改角色
export function cosupdate(data: LoginResponse) {
  return post<any>('/systems/index/cosupdatecos', { data });
}



// ----------------订单------------------
// 订单管理
export function getorder(data: LoginResponse) {
  return get<any>('/order/index/getorders', { data }); 
}
// 查询详细订单
export function getorderdetail(data: LoginResponse) {
  return get<any>('/order/index/getorderdetail', { data });
}
// 售后
// 获取售后信息
export function getafter(data: LoginResponse) {
  return get<any>('/order/index/getAfter_sales_management', { data });
}
// 更改数据状态
export function updateafter(data: LoginResponse) {
  return post<any>('/order/index/updateAfter_sales_management', { data });
}
// 查找售后详细信息
export function getafterdetail(data: LoginResponse) {
  return get<any>('/order/index/getAfter_sales_management_detail', { data });
}
// 发货
export function getshipment(data: LoginResponse) {
  return get<any>('/order/index/getshipment', { data });
}

// ----------------用户--------------------
// 用户管理
export function getqianuser(data: LoginResponse) {
  return get<any>('/user/index/getqianusers', { data });
}
// 修改单个用户状态
export function updateqianuser(data: LoginResponse) {
  return post<any>('/user/index/updateqianusers', { data });
}
// 批量修改用户状态
export function updateqianusers(data: LoginResponse) {
  return post<any>('/user/index/allupdateqianusers', { data });
}
//获取用户标签
export function getuserlabel(data: LoginResponse) {
  return get<any>('/user/index/getuserlabel', { data });
}
// 添加用户标签
export function adduserlabel(data: LoginResponse) {
  return post<any>('/user/index/adduserlabel', { data });
}
// 修改用户标签
export function updateuserlabel(data: LoginResponse) {
  return post<any>('/user/index/updateuserlabel', { data });
}
// 内容
// 获取热词
export function getworks(data: LoginResponse) {
  return get<any>('/content/index/getsearch', { data });
}
// 添加热词
export function addworks(data: LoginResponse) {
  return post<any>('/content/index/addsearch', { data });
}
// 修改状态
export function updateworks(data: LoginResponse) {
  return post<any>('/content/index/updatestatus', { data });
}
// 删除热词
export function deleteworks(data: LoginResponse) {
  return post<any>('/content/index/deleteworks', { data });
}
// 修改热词
export function updateworksinfo(data: LoginResponse) {
  return post<any>('/content/index/updateworksinfo', { data });
}

// ------------------广告-------------------
// 添加广告
export function addads(data: LoginResponse) {
  return post<any>('/content/index/addads', { data });
}
// 获取广告列表
export function getads(data: LoginResponse) {
  return get<any>('/content/index/getads', { data });
}
// 修改广告状态
export function updateads(data: LoginResponse) {
  return post<any>('/content/index/updateads ', { data });
}
// 删除广告
export function deleteads(data: LoginResponse) {
  return post<any>('/content/index/deleteads', { data });
}
// 修改广告
export function updateadsinfo(data: LoginResponse) {
  return post<any>('/content/index/updateadsinfo', { data });
}
// -----------------专题------------------
// 查找专题
export function gettopic(data: LoginResponse) {
  return get<any>('/content/index/gettopic', { data });
}
// 修改专题状态
export function updatetopic(data: LoginResponse) {
  return post<any>('/content/index/updatetopic', { data });
}
// 删除专题
export function deletetopic(data: LoginResponse) {
  return post<any>('/content/index/deletetopic', { data });
}


// ---------------------- 监控分析--------------------
// 获取商品销售数量
export function getgoodsales(data: LoginResponse) {
  return get<any>('/analysiss/index/getshop', { data });
}
// 获取团长销量
export function getteamleader(data: LoginResponse) {
  return get<any>('/analysiss/index/getgroup', { data });
}

// --------------------财务----------------------
// 获取账单信息
export function getbill(data: LoginResponse) {
  return get<any>('/finances/index/getbill', { data });
}